/*
 * Copyright (c) 2009, Jan Pastor. All Rights Reserved.
 */

package sk.jp.jitag.ui;

import javax.swing.Icon;
import javax.swing.JFrame;
import javax.swing.JOptionPane;

import sk.jp.jitag.ui.common.IconLoader;
import sk.jp.jitag.ui.common.Icons;
import sk.jp.jitag.util.Msg;
import sk.jp.jitag.util.Property;
import sk.jp.commons.tools.Messages;

/**
 * About application dialog.
 */
public class AboutDialog {

    private AboutDialog() {
    }

    /**
     * Opens modal dialog.
     * @param parentFrame
     */
    public static void show(JFrame parentFrame){
        Icon icon = IconLoader.loadIcon(Icons.jitagIcon32);
        JOptionPane.showMessageDialog(parentFrame,
                                      Messages.getMessage(Msg.aboutDlgText.getPropKey(),
                                                          Property.appVersion.value()), //JiTag, version x.y.z, copyright
                                      Msg.aboutDlgTitle.value(), //About application
                                      JOptionPane.INFORMATION_MESSAGE, icon);
    }
}
